package com.ruoyi.web.core.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * Description: com.ruoyi.web.core.config
 * User: hushibo
 * Date: 2021-05-17 11:06
 * Time: 11:06
 * Version: 1.0
 */
@EnableWebSocket
@Configuration
public class WebSocketConfig {

    /*
    自动注册使用@ServerEndpoint注解声明的websocket endpoint
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
